package communication.message;

/***
 * 
 * @author Bogusław Zaręba
 *
 */

public class Point {
	int x, y;
	
	public Point(int x, int y) {
		this.x = x;
		this.y = y;
	}
	
	public int getX() {
		return x;
	}
	
	public int getY() {
		return y;
	}
	
	public  boolean equals(Point p) {
		return p.getX() == x && p.getY() == y;
	}
	@Override
	public  boolean equals(Object point) {
		Point p=(Point)point;
		return p.getX() == x && p.getY() == y;
	}
	public String toString() {
		return XMLTagCreator.singleTag("Point", "x", "" +  x, "y", "" + y);
	}
}